using SheLife.Domain.Entities;

namespace SheLife.Domain.Interfaces.Repositories
{
    /// <summary>
    /// 角色权限仓储接口
    /// </summary>
    public interface IRolePermissionRepository : IRepository<RolePermission>
    {
        Task<IEnumerable<RolePermission>> GetByRoleIdAsync(Guid roleId);
        Task<IEnumerable<RolePermission>> GetByPermissionIdAsync(Guid permissionId);
        Task<RolePermission> GetByRoleIdAndPermissionIdAsync(Guid roleId, Guid permissionId);
        Task<bool> IsRolePermissionExistsAsync(Guid roleId, Guid permissionId);
        Task DeleteByRoleIdAsync(Guid roleId);
        Task DeleteByPermissionIdAsync(Guid permissionId);
    }
}